<!doctype html>
<html lang="zxx">
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link rel="stylesheet" href="/css/bootstrap.min.css">

    <link rel="stylesheet" href="/css/owl.theme.default.min.css">

    <link rel="stylesheet" href="/css/owl.carousel.min.css">

    <link rel="stylesheet" href="/css/remixicon.css">

    <link rel="stylesheet" href="/css/meanmenu.min.css">

    <link rel="stylesheet" href="/css/animate.min.css">

    <link rel="stylesheet" href="/css/style.css">

    <link rel="stylesheet" href="/css/responsive.css">

    <title>百货购物商城</title>
</head>
<body>

<div class="preloader">
    <div class="content">
        <div class="box"></div>
    </div>
</div>


<header class="header-area">
    <div class="top-header">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-lg-8">
                    <ul class="header-left-content">
                        <li>
                            <a href="about.html">
                                关于我们
                            </a>
                        </li>
                        <li>
                            <a href="store-location.html">
                                店铺地址
                            </a>
                        </li>
                        <li>
                            需要帮助? Call:
                            <a href="tel:+1-(514)-321-4567">
                                <span>+1 (514) 321-4567</span>
                            </a>
                        </li>
                    </ul>
                </div>
                <div class="col-lg-4">
                    <div class="header-right-content">
                        <ul>
                            <li>
                                <a href="/page/mycount">登录账号</a>
                            </li>
                            <li>
                                <a href="/page/dashboard">个人信息</a>
                            </li>
                            <li>
                                <div class="navbar-option-item navbar-option-language dropdown language-option">
                                    <button class="dropdown-toggle" type="button" id="language2"
                                            data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                        <span class="lang-name">English</span>
                                    </button>
                                    <div class="dropdown-menu language-dropdown-menu" aria-labelledby="language2">
                                        <a class="dropdown-item" href="#">
                                            <img src="/picture/english.png" alt="Image">
                                            English
                                        </a>
                                        <a class="dropdown-item" href="#">
                                            <img src="/picture/deutsch.png" alt="Image">
                                            Deutsch
                                        </a>
                                        <a class="dropdown-item" href="#">
                                            <img src="/picture/china.png" alt="Image">
                                            简体中文
                                        </a>
                                        <a class="dropdown-item" href="#">
                                            <img src="/picture/arbic.png" alt="Image">
                                            العربيّة
                                        </a>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <div class="middle-header">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-lg-3">
                    <div class="logo">
                        <a href="">
                            <img src="/picture/logo.png" alt="Image">
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="navbar-area only-home-one-sticky">
        <div class="mobile-responsive-nav">
            <div class="container">
                <div class="mobile-responsive-menu">
                    <!--  导航侧边栏  -->
                    <div class="logo">
                        <a href="">
                            <img src="/picture/logo.png" alt="logo">
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <div class="desktop-nav">
            <div class="container">
                <nav class="navbar navbar-expand-md navbar-light">
                    <div class="navbar-category">
                        <button type="button">
                            <i class="ri-menu-line"></i>
                            全部分类
                            <i class="arrow-down ri-arrow-down-s-line"></i>
                        </button>
                        <div class="navbar-category-dropdown">
                            <ul id="categorylist">
                            </ul>
                        </div>
                    </div>
                    <div class="collapse navbar-collapse mean-menu" id="navbarSupportedContent">
                        <ul class="navbar-nav">
                            <li class="nav-item float-end">
                                <a href="/page/index" class="nav-link active">
                                    首页
                                </a>
                            </li>
                            <li class="nav-item mega-menu">
                                <a href="/page/products" class="nav-link">
                                    全部商品
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="/page/dashboard" class="nav-link">
                                    个人信息管理
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="/page/cart" class="nav-link">
                                    我的购物车
                                </a>
                            </li>
                        </ul>
                    </div>
                </nav>
            </div>
        </div>
    </div>
</header>

<section class="hero-slider-area">
    <div class="container">
        <div class="row justify-content-end">
            <div class="col-lg-9">
                <div class="hero-slider owl-carousel owl-theme">
                    <div class="slider-item bg-1">
                        <div class="d-table">
                            <div class="d-table-cell">
                                <div class="hero-slider-content">
                                    <h2>最棒的服务</h2>
                                    <h1>高质量的购买服务就在这里</h1>
                                    <h3>免费试用,并且还有超高折扣</h3>
                                    <div class="hero-slider-btn">
                                        <a href="/page/products" class="default-btn">
                                            <i class="ri-shopping-cart-line"></i>
                                            立刻购买
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="slider-item bg-2">
                        <div class="d-table">
                            <div class="d-table-cell">
                                <div class="hero-slider-content">
                                    <h2>最优的体验</h2>
                                    <h1>收集了2025年最新的商品</h1>
                                    <h3>免费试用,并且还有超高折扣</h3>
                                    <div class="banner-btn">
                                        <a href="/page/products" class="default-btn">
                                            <i class="ri-shopping-cart-line"></i>
                                            立刻购买
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="slider-item bg-3">
                        <div class="d-table">
                            <div class="d-table-cell">
                                <div class="hero-slider-content">
                                    <h2>最低的价格</h2>
                                    <h1>全面的百货商品</h1>
                                    <h1>覆盖你生活的每一面</h1>
                                    <h3>免费试用,并且还有超高折扣</h3>
                                    <div class="banner-btn">
                                        <a href="/page/products" class="default-btn">
                                            <i class="ri-shopping-cart-line"></i>
                                            立刻购买
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>


<section class="services-area ptb-30">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-4 col-sm-6">
                <div class="single-services">
                    <div class="icon">
                        <img src="/picture/support.png" alt="Image">
                    </div>
                    <h3 style="font-weight: 600">客 服 服 务</h3>
                    <p>我们提供最好的客服服务,全天24小时在线,一周7天在线</p>
                </div>
            </div>
            <div class="col-lg-4 col-sm-6">
                <div class="single-services">
                    <div class="icon">
                        <img src="/picture/payment.png" alt="Image">
                    </div>
                    <h3 style="font-weight: 600">安 全 支 付</h3>
                    <p>使用最安全的支付方式,保证您的资金安全</p>
                </div>
            </div>
            <div class="col-lg-4 col-sm-6">
                <div class="single-services">
                    <div class="icon">
                        <img src="/picture/network.png" alt="Image">
                    </div>
                    <h3 style="font-weight: 600">全 球 配 送</h3>
                    <p>全球各地均能发货,您在哪里,我们就去哪里</p>
                </div>
            </div>
        </div>
    </div>
</section>

<!--首页指定商品滚动展示-->
<section class="best-seller-area pb-30">
    <div class="container">
        <div class="section-title">
            <h2>热门产品</h2>
        </div>
        <div class="best-product-slider owl-carousel owl-theme" type="bestproductlist">

        </div>
    </div>
</section>

<section class="sale-offer-area">
    <div class="container">
        <div class="sale-offer-bg">
            <h5>清仓大甩卖 - <span>低至六折起</span></h5>
            <h3>全场高品好货</h3>
            <a href="/page/products" class="default-btn">
                <i class="ri-shopping-cart-line"></i>
                立刻购买
            </a>
        </div>
    </div>
</section>
<section class="subscribe-area pt-54 pb-30">
    <div class="container">
        <div class="row align-items-center">
            <div class="col-lg-2">
                <div class="logo">
                    <a href="/page/index">
                        <img src="/picture/white-logo.png" alt="Image">
                    </a>
                </div>
            </div>
            <div class="col-lg-5">
                <div class="subscribe-content">
                    <span>全部商品三折处理</span>
                    <h3>七天无理由退货,保障您的权益</h3>
                    <p>全场货物免费送运费险,让您退货无忧</p>
                </div>
            </div>
        </div>
    </div>
</section>


<div class="copy-right-area">
    <div class="container">
        <p>Copyright &copy; 2021.Company name All rights reserved.<a target="_blank" href="https://www.downdemo.com">&#x7F51;&#x9875;&#x6A21;&#x677F;</a>
        </p>
    </div>
</div>

<div class="modal fade product-view-one" id="exampleModal">
    <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
        <div class="modal-content">
            <button type="button" class="close" data-bs-dismiss="modal">
<span aria-hidden="true">
<i class="ri-close-line"></i>
</span>
            </button>
            <div class="row align-items-center">
                <div class="col-lg-6">
                    <div class="product-view-one-image">
                        <div id="big" class="owl-carousel owl-theme">
                            <div class="item">
                                <img src="/picture/product-1.jpg" alt="Image">
                            </div>
                            <div class="item">
                                <img src="/picture/product-2.jpg" alt="Image">
                            </div>
                            <div class="item">
                                <img src="/picture/product-3.jpg" alt="Image">
                            </div>
                            <div class="item">
                                <img src="/picture/product-4.jpg" alt="Image">
                            </div>
                            <div class="item">
                                <img src="/picture/product-5.jpg" alt="Image">
                            </div>
                            <div class="item">
                                <img src="/picture/product-6.jpg" alt="Image">
                            </div>
                        </div>
                        <div id="thumbs" class="owl-carousel owl-theme">
                            <div class="item">
                                <img src="/picture/product-1.jpg" alt="Image">
                            </div>
                            <div class="item">
                                <img src="/picture/product-2.jpg" alt="Image">
                            </div>
                            <div class="item">
                                <img src="/picture/product-3.jpg" alt="Image">
                            </div>
                            <div class="item">
                                <img src="/picture/product-4.jpg" alt="Image">
                            </div>
                            <div class="item">
                                <img src="/picture/product-5.jpg" alt="Image">
                            </div>
                            <div class="item">
                                <img src="/picture/product-6.jpg" alt="Image">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-6">
                    <div class="product-content">
                        <h3>
                            Cordless Drill Professional Combo Drill And Screwdriver
                        </h3>
                        <div class="product-review">
                            <div class="rating">
                                <i class="ri-star-fill"></i>
                                <i class="ri-star-fill"></i>
                                <i class="ri-star-fill"></i>
                                <i class="ri-star-fill"></i>
                                <i class="ri-star-fill"></i>
                            </div>
                            <a href="#" class="rating-count">4 Reviews</a>
                        </div>
                        <div class="price">
                            <span class="new-price">$119.0 <del>$219.0</del></span>
                            <span class="in-stock">In Stock (8 Items)</span>
                        </div>
                        <ul class="product-info">
                            <li>
                                <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. At magnam ad reprehenderit
                                    fuga nam, non odit necessitatibus facilis beatae temporibus</p>
                            </li>
                            <li>
                                <span>SKU:</span>
                                001
                            </li>
                            <li>
                                <span>Availability:</span>
                                Available
                            </li>
                            <li>
                                <span>Brand:</span>
                                Ehay
                            </li>
                            <li>
                                <span>Categories:</span>
                                <a href="products.html">Power Drill</a>
                            </li>
                        </ul>
                        <div class="product-color-switch">
                            <ul>
                                <li>
                                    <span>Color:</span>
                                </li>
                                <li>
                                    <button title="Black" class="color-black"></button>
                                </li>
                                <li>
                                    <button title="White" class="color-white"></button>
                                </li>
                                <li class="active">
                                    <button title="Green" class="color-green"></button>
                                </li>
                                <li>
                                    <button title="Yellow Green" class="color-yellowgreen"></button>
                                </li>
                                <li>
                                    <button title="Teal" class="color-teal"></button>
                                </li>
                            </ul>
                        </div>
                        <div class="product-add-to-cart">
                            <div class="input-counter">
<span class="minus-btn">
<i class="ri-subtract-line"></i>
</span>
                                <input type="text" value="1">
                                <span class="plus-btn">
<i class="ri-add-line"></i>
</span>
                            </div>
                            <a href="javascript:;" class="default-btn">
                                <i class="ri-shopping-cart-line"></i>
                                Add To Cart
                            </a>
                        </div>
                        <div class="wishlist-btn">
                            <a href="wishlist.html" class="default-btn">
                                <i class="ri-heart-line"></i>
                                Wishlist
                            </a>
                        </div>
                        <div class="share-this-product">
                            <ul>
                                <li>
                                    <span>Share</span>
                                </li>
                                <li>
                                    <a href="javascript:;" target="_blank">
                                        <i class="ri-facebook-fill"></i>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" target="_blank">
                                        <i class="ri-instagram-line"></i>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" target="_blank">
                                        <i class="ri-linkedin-fill"></i>
                                    </a>
                                </li>
                                <li>
                                    <a href="javascript:;" target="_blank">
                                        <i class="ri-twitter-fill"></i>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="go-top">
    <i class="ri-arrow-up-s-fill"></i>
    <i class="ri-arrow-up-s-fill"></i>
</div>


<script src="/layui/layui.all.js"></script>
<!--侧边导航栏-->
<script type="text/html" id="categoryitem">
    <li style="text-align: center">
        <a href="">{{name}}</a>
    </li>
</script>
<!--获取分类信息-->
<script>
    const $ = layui.$;
    $.ajax({
        url: '/category/getchildren',
        data: {id: -1},
        success: function (result) {
            for (let i = 0; i < result.length; i++) {
                let item = $("#categoryitem").text();
                const $item = $(item);
                $item.find("a").text(result[i].name);
                $item.find("a").attr('href','/page/categoryproducts?pid='+result[i].id);
                $("#categorylist").append($item);
            }
        }
    });
</script>
<!--热门商品展示栏-->
<script type="text/html" id="bestproductitem">
    <div class="single-products">
        <input type="hidden" name="pid" value="">
        <div class="product-img">
            <a name="bestpic">
                <img src="" alt="Image" type="bestpic"/>
            </a>
        </div>
        <div class="product-content">
            <a href="product-details.html" class="title" type="bestproductinfo" style="font-size: 25px">
                货品描述
            </a>
            <ul class="products-price">
                <li style="font-size: 22px">
                    金额:
                </li>
                <li type="bestproductprice" style="font-size: 22px">
                </li>
                <li>
                    <span>在售</span>
                </li>
            </ul>
            <ul class="products-cart-wish-view">
                <li>
                    <a class="default-btn" type="addincart">
                        <i class="ri-shopping-cart-line"></i>
                        加入购物车
                    </a>
                </li>
            </ul>
        </div>
    </div>
</script>
<!--获取商品信息  商品状态栏为内容为3的商品-->
<script th:inline="javascript">
    $.ajax({
        url: '/product/state',
        data: {state: 3},
        async:false,
        success: function (result) {
            for (let i = 0; i < result.length; i++) {
                let item = $("#bestproductitem").text();
                const $item = $(item);
                $item.find('[name=bestpic]').attr('href','/page/putid?id='+result[i].id);
                $item.find('[type=bestproductprice]').text('￥'+result[i].price);
                $item.find('[type=bestproductinfo]').text(result[i].name);
                $item.find('[name=pid]').attr('value',result[i].id);
                $item.find('[type=bestpic]').attr('src','/'+result[i].defaultimg);
                $("[type=bestproductlist]").append($item);
            }
        }
    });

    $("[type=addincart]").on('click',function(event){
        event.preventDefault();
        let id = $(this).closest(".single-products").find("[name=pid]").val();
        console.log("id:"+id);
        $.ajax({
            url:'/cart/addcart',
            data:{productid:id},
            async: false,
            success:function(result){
                if (result==500){
                    layer.msg("请先登录",{icon:2,time:1200});
                }else{
                    layer.msg("添加成功",{icon:1,time:1200});
                }

            }
        })
    })
</script>
<script src="/js/jquery.min.js"></script>

<script src="/js/bootstrap.bundle.min.js"></script>

<script src="/js/meanmenu.min.js"></script>

<script src="/js/owl.carousel.min.js"></script>

<script src="/js/wow.min.js"></script>

<script src="/js/range-slider.min.js"></script>

<script src="/js/form-validator.min.js"></script>

<script src="/js/contact-form-script.js"></script>

<script src="/js/ajaxchimp.min.js"></script>

<script src="/js/custom.js"></script>
</body>
</html>